package com.wuchao.springs.printer;

import com.sun.javafx.binding.StringFormatter;

import java.text.MessageFormat;

/**
 * @Author wuchao66
 * @Date 2023/10/12 10:19
 * @PackageName:com.wuchao.springs.printer
 * @ClassName: Print
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
public class Print {
    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    public Ink getInk() {
        return ink;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    //set get 设值注入
    private Paper paper;
    private Ink ink;

    public void printshow(){
        //MessageFormat.format("{0}纸在用{1}油墨打印",paper.getPaper(),ink.getInk())
        //StringFormatter.format()
        System.out.println("xxxxx");
        System.out.println(StringFormatter.format("%s纸在用%s油墨打印",paper.getPaper(),ink.getInk()));
        System.out.println(paper.getPaper()+"纸在用"+ink.getInk()+"油墨打印");
    }



}
